package com.cgw.dmplt.rent.dao.ibatis;

import java.util.List;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import com.cgw.dmplt.rent.domain.RentFlow;
import com.cgw.dmplt.rent.dao.RentFlowDao;

/**
 *
 */
public class RentFlowDaoImpl extends SqlMapClientDaoSupport implements RentFlowDao
{
    /**
     * insert.
     * @param rentFlow rentFlow
     * @return id
     */
    public String insertRentFlow(RentFlow rentFlow) {

        
    	getSqlMapClientTemplate().insert("RentFlow_insertRentFlow", rentFlow);
	
    	return null;
    }

    /**
     * delete.
     * @param rentFlow rentFlow
     */
    public void deleteRentFlow(RentFlow rentFlow) {
        getSqlMapClientTemplate().update("RentFlow_deleteRentFlow", rentFlow);
    }
    
    /**
     * update.
     * @param rentFlow rentFlow
     */
    public void updateRentFlow(RentFlow rentFlow) {
    	getSqlMapClientTemplate().update("RentFlow_updateRentFlow", rentFlow);
    }
    
    /**
     * find.
     * @param id id
     * @return rentFlow
     */
    public RentFlow findRentFlow(Integer pk) {
        RentFlow rentFlow = (RentFlow) getSqlMapClientTemplate().queryForObject("RentFlow_findRentFlow", pk);
        return rentFlow;
    }
    
    /**
     * list.
     * @param rentFlow rentFlow
     * @return rentFlow list
     */
    public List listRentFlow(RentFlow rentFlow) {

        List list = getSqlMapClientTemplate().queryForList("RentFlow_listRentFlow", rentFlow);
        return list;
    }  
    
    /**
     * listCount.
     * @param rentFlow rentFlow
     * @return list count
     */
    public Integer listRentFlowCount(RentFlow rentFlow) {
        Integer count = (Integer)getSqlMapClientTemplate().queryForObject("RentFlow_listRentFlowCount", rentFlow);
        
        return count;
    }  
}
